home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11713 < prev    next >
Encoding:
Text File  |  2002-07-05  |  3.9 KB  |  145 lines

  1. <HTML>
  2. <HEAD>
  3.   <LINK REL="stylesheet" TYPE="text/css" HREF="%1css/default.css">
  4.  
  5. <SCRIPT language="Javascript">
  6. //LOCALIZATION STRINGS
  7. var L_DELIM_MSG = "The value cannot be more than one character long.";
  8. var L_NOT_A_NUMBER = "The value must be a positive whole number.";
  9. var L_EXCEL_COL_WIDTH_INVALID = "The column width is not valid. Please enter a positive number in the range of 10 to 288 points.";
  10. </SCRIPT>
  11.  
  12. <SCRIPT LANGUAGE="JavaScript" SRC="%1js/FormChek.js"></SCRIPT>
  13.  
  14. <SCRIPT>
  15. function init()
  16. {
  17.     var sel = '%2';
  18.     for(var i = 0; i < document.forms['formatForm'].format.options.length; ++i)
  19.     {
  20.         if(document.forms['formatForm'].format.options[i].value == sel)
  21.         {
  22.             document.forms['formatForm'].format.options[i].selected = true;
  23.             break;
  24.         }
  25.     }
  26.  
  27.     if ( document.forms["formatForm"].colwidthisconst != null )
  28.         disableConstColWidth();
  29. }
  30.  
  31. function changeFormat(f)
  32. {
  33.     document.location.replace("%3" + "&format=" + f);
  34. }
  35.  
  36. function submitForm()
  37. {
  38.     // input validation
  39.     
  40.     if(document.forms["formatForm"].format.options[document.forms["formatForm"].format.selectedIndex].value == 8)    // character-separated values 
  41.     {
  42.         var delimiter = document.forms["formatForm"].delim;
  43.         if(delimiter.value.length > 1)
  44.         {
  45.             alert(L_DELIM_MSG);
  46.             delimiter.focus();
  47.             delimiter.select();
  48.             return;
  49.         }
  50.     }
  51.     else if(document.forms["formatForm"].format.options[document.forms["formatForm"].format.selectedIndex].value == 6)    // paginated text
  52.     {
  53.         var lines = document.forms["formatForm"].lines;
  54.         if(!isPositiveInteger(lines.value))
  55.         {
  56.             alert(L_NOT_A_NUMBER);
  57.             lines.focus();
  58.             lines.select();
  59.             return;
  60.         }
  61.     }
  62.     else if ( document.forms["formatForm"].format.options[document.forms["formatForm"].format.selectedIndex].value == 1)    // Excel
  63.     {
  64.         if ( document.forms["formatForm"].colwidthisconst[1].checked == true )
  65.         {
  66.             var test = Number( document.forms["formatForm"].colwidth.value );
  67.  
  68.             if ( isNaN( test ) || (test < 10 || test > 288) )
  69.             {
  70.                 alert( L_EXCEL_COL_WIDTH_INVALID );
  71.                 document.forms["formatForm"].colwidth.focus();
  72.                 document.forms["formatForm"].colwidth.select();
  73.                 return;
  74.             }
  75.         }
  76.     }
  77.     document.forms['formatForm'].submit();
  78. }
  79.  
  80. function resetForm()
  81. {
  82.     document.location.replace("%4");
  83. }
  84.  
  85. function disableConstColWidth()
  86. {
  87.     var test = document.forms["formatForm"].colwidthisconst[0].checked ;
  88.     document.forms["formatForm"].colwidth.disabled = test;
  89. }
  90. </SCRIPT>
  91.  
  92. </HEAD>
  93. <BODY LEFTMARGIN="5" RIGHTMARGIN="5" onload='init()'>
  94.  
  95. <DIV ID="tooltip" STYLE="position:absolute;visibility:hidden;z-index:99;"></DIV>
  96. <SCRIPT SRC="%1js/helps.js"></SCRIPT>
  97. <SCRIPT SRC="%1js/tips.js"></SCRIPT>
  98.  
  99. <span class='listSelected'>Set the Format for the report.</span><br>
  100.  
  101. <p>
  102.  
  103. <center>
  104. <form name='formatForm' method=POST action='%5' onsubmit="submitForm();return false;">
  105. <table width='90%'>
  106. <tr><td class='list'>
  107. </td></tr>
  108. <tr><td class='list'>
  109. Format:
  110. <select name='format' class='menuFormElement' onchange='changeFormat(this.options[this.selectedIndex].value)';>
  111. <option value='0' selected>Crystal Report
  112. <option value='1'>Excel
  113. <option value='9'>Excel (Data Only)
  114. <option value='2'>Word
  115. <option value='3'>Acrobat
  116. <option value='4'>Rich Text
  117. <option value='5'>Plain Text
  118. <option value='6'>Paginated Text
  119. <option value='7'>Tab-separated Values
  120. <option value='8'>Character-separated Values
  121. </select>
  122. </td></tr>
  123. </table>
  124.  
  125. <p>
  126.  
  127. %6
  128.  
  129. </form>
  130. </center>
  131.  
  132.   <table align="right" border=0 cellpadding=0>
  133.   <tr valign=center>
  134.   <td class="clsButton" align=middle nowrap>
  135.   <div class="clsButton"><a href="javascript: submitForm()" onMouseOver="St(7);window.status='';return true;" onMouseOut="Ht()">Update</a></div>
  136.   </td>
  137.   <td class="clsButton" align=middle nowrap>
  138.   <div class="clsButton"><a href="javascript: resetForm()" onMouseOver="St(8);window.status='';return true;" onMouseOut="Ht()">Reset</a></div>
  139.   </td>
  140.   </tr>  
  141.   </table>
  142.  
  143. </BODY>
  144. </HTML>
  145.